{% extends "index.html" %}
	
<link rel="StyleSheet" href="media/css/table.css" type="text/css">
{% block ip_content %}
	<div id="kutubaslik"><strong>Zincir Girdi Tablosu</strong></div>	
			<br/>
			<br/>
			<br/>
	<div id="itsthetable">
		<table summary="Submitted table designs">
			<caption>Kurallar</caption>
			<thead>
				<tr>
					<th scope="col">Isim</th>
					<th scope="col">Kural Sayısı</th>
					<th scope="col">Sil</th>

				</tr>
			</thead>	
			
			<tbody>
			{% if object_list %}
				{% for chain in object_list %}				
					<tr >
						
						<th scope="row">
						{% ifequal chain.name "INPUT" %}{{chain.name}}{% endifequal %}
						{% ifequal chain.name "OUTPUT" %}{{chain.name}}{% endifequal %}
						{% ifequal chain.name "FORWARD" %}{{chain.name}}{% endifequal %}

						{% ifnotequal chain.name "INPUT" %}
							{% ifnotequal chain.name "OUTPUT" %}
								{% ifnotequal chain.name "FORWARD" %}<a href="/iptables/chain/edit/show/{{chain.id}}/">{{chain.name}}</a>{% endifnotequal %}
							{% endifnotequal %}
						{% endifnotequal %}
						
						
						</th>
						<td>
							{% ifequal chain.rule_set.count 0 %}{{chain.rule_set.count}}{% endifequal %}
							{% ifnotequal chain.rule_set.count 0 %}<a href="/iptables/rule/sort/{{chain.name}}/">{{chain.rule_set.count}}</a>{% endifnotequal %}
						</td>

						<td>
	
							{% ifnotequal chain.name "INPUT" %}
								{% ifnotequal chain.name "OUTPUT" %}
									{% ifnotequal chain.name "FORWARD" %}<a href="/iptables/chain/{{chain.id}}/delete/">
							<img src="media/images/trash.gif" width="40px" height="40px">
							</a>{% endifnotequal %}
								{% endifnotequal %}
							{% endifnotequal %}
							
						</td>
						
					</tr>
				{% endfor %}
			{% endif %}
</tbody>
</table> 
	<div id="container">
		{% if has_previous %}
			<div id="leftcolumn"><a href="?page={{previous}}">Onceki</a></div>
		{% endif %}

		{% if has_next %}
		<div id="rightcolumn"><a href="?page={{next}}">Sonraki</a></div>
		{% endif %}

	</div >

{% endblock %}